<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=7" />
        <title>EPAC - Homepage</title>
        <link rel="shortcut icon" href="<?php echo $this->baseUrl() ?>/images/favicon.ico" type="image/x-icon"/>
        <link href="<?php echo $this->baseUrl() ?>/public/css/style.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" src="<?php echo $this->baseUrl() ?>/public/js/jquery-1.10.0.min.js"></script>        
        <!--[if gt IE 6]>
        <link rel="stylesheet" href="<?php echo $this->baseUrl() ?>/public/css/ie.css" type="text/css" media="screen" />
        <![endif]-->
    </head>

    <body>
        <div class="wrap">
            <div class="center">
                <div class="top_bg"></div>
                <div class="header">
                    <div class="left">
                        <a href='<?php echo $this->baseUrl() ?>'>
                            <img src="<?php echo $this->baseUrl() ?>/public/images/logo.png" width="100">
                        </a>
                    </div>
                    <div align="right" class="right">
                        <div class="login">
                            <?php if (!empty($this->session->user)): ?>
                                <?php $user = $this->session->user ?>
                                <div class="welcome">
                                    Welcome, <span class="user"><?php echo $user->username ?></span>!
                                    <a href="<?php echo $this->baseUrl() ?>/auth/logout">
                                        <img class="logout" src="<?php echo $this->baseUrl() ?>/public/images/logout.png" alt="Log out">
                                    </a>
                                </div>
                            <?php else: ?>
                                <form action="<?php echo $this->baseUrl() ?>/auth" method="POST" autocomplete="false">
                                    <input type="text" class="username" placeholder="Username" name="username" />
                                    <input type="password" class="password" placeholder="Password" name="password"/>
                                    <input type="submit" class="submit" value="LOGIN" />
                                    <div class="remember">
                                        <input type="checkbox" name='remember_me'/>
                                        <span>Remember password</span>
                                    </div>
                                </form>
                            <?php endif; ?>
                        </div>
                        <div class="navigation">
                            <ul>
                                <li>
                                    <?php if ($this->controller == 'index'): ?>
                                        <span> HOME </span>
                                    <?php else: ?>
                                        <a href="<?php echo $this->baseUrl() ?>"> HOME </a>
                                    <?php endif; ?>
                                </li>
                                <li class="sub">
                                    <?php if ($this->controller == 'service') : ?>
                                        <span> OUR SERVICES </span>
                                    <?php else: ?>
                                        <a href="javascript:void(0)"> OUR SERVICES </a>
                                    <?php endif; ?>
                                    <ul>
                                        <?php if (!empty($this->session->user) &&
                                                ($this->session->user->role == Core_Role::ROLE_INPUT ||
                                                $this->session->user->role == Core_Role::ROLE_ADMIN)): ?>
                                            <li class="1st">
                                                <a href="<?php echo $this->baseUrl() ?>/service/new">New Service</a>
                                            </li>
                                        <?php endif; ?>
                                        <li class="1st">
                                            <a href="<?php echo $this->baseUrl() ?>/service/dunnage.html">Dunnage</a>
                                        </li>
                                        <li>
                                            <a href="<?php echo $this->baseUrl() ?>/service/tally.html">Tally</a>
                                        </li>
                                        <li>
                                            <a href="<?php echo $this->baseUrl() ?>/service/cargo.html">Cargo</a>
                                        </li>                                   
                                    </ul>
                                </li>
                                <li>
                                    <?php if ($this->controller == 'tracking'): ?>
                                        <span> TRACKING YOUR SHIP </span>
                                    <?php else: ?>
                                        <a href="<?php echo $this->baseUrl()?>/tracking"> TRACKING YOUR SHIP </a>
                                    <?php endif; ?>
                                </li>
                                <li>
                                    <a href="#"> ABOUT US </a>
                                </li>
                                <li class="last">
                                    <?php if ($this->controller == 'contact'): ?>
                                        <span>CONTACT US</span>
                                    <?php else: ?>
                                        <a href="<?php echo $this->baseUrl()?>/contact">CONTACT US</a>
                                    <?php endif; ?>
                                </li>
                            </ul>
                        </div>

                    </div>
                </div>
                <?php echo $this->layout()->content ?>
            </div>	
            <div id="footer-content-wrapper">
                <div id="footer">
                    <div id="fbox1">
                        <h2>OUR SERVICES</h2>
                        <ul>
                            <li><a href="#">dunnage <span class="style1">|</span></a></li>
                            <li><a href="#">tally <span class="style1">|</span></a></li>
                            <li><a href="#">cargo supervisor</a></li>
                        </ul>
                    </div>
                    <div id="fright">
                        <p>Copyright 2013 EPAC.</p>
                    </div>
                </div>
            </div>

        </div>
        <script>
            var base_url = '<?php echo $this->baseUrl() ?>';
            var date_format = 'd/m/yy';
        </script>        
    </body>
</html>
